<template>
    <div id="app">
        <!-- <router-view v-slot="{ Component }">
            <keep-alive>
                <component :is="Component" />
            </keep-alive>
        </router-view> -->
        <router-view></router-view>
    </div>
    <Footer v-if="routeName =='home' || routeName == 'my'"></Footer>
</template>

<script setup>

import Footer from '@/components/footer.vue'
import { watch, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router';

// console.log(useRoute(),useRouter())
const routeName = ref('');

// 监听路由数据
watch(useRoute(), (newvalue, oldvalue) => {
    routeName.value = newvalue.name;
});

</script>

<style lang="less">
.el-message {
    font-size: 0.3rem;
    padding: 0.2rem;
}

p {
    margin: 0;
    padding: 0;
}


</style>
